home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / SCSL / srotg.z / srotg
Encoding:
Text File  |  2002-10-03  |  15.3 KB  |  331 lines

  1.  
  2.  
  3.  
  4. SSSSRRRROOOOTTTTGGGG((((3333SSSS))))                                                            SSSSRRRROOOOTTTTGGGG((((3333SSSS))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      SSSSRRRROOOOTTTTGGGG, DDDDRRRROOOOTTTTGGGG, CCCCRRRROOOOTTTTGGGG, ZZZZRRRROOOOTTTTGGGG - Constructs a Givens plane rotation
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      Single precision
  13.  
  14.           Fortran:
  15.                CCCCAAAALLLLLLLL SSSSRRRROOOOTTTTGGGG ((((_a,,,, _b,,,, _c,,,, _s))))
  16.  
  17.           C/C++:
  18.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  19.                vvvvooooiiiidddd ssssrrrroooottttgggg ((((ffffllllooooaaaatttt *_a,,,, ffffllllooooaaaatttt *_b,,,, ffffllllooooaaaatttt *_c,,,, ffffllllooooaaaatttt *_s))));;;;
  20.  
  21.      Double precision
  22.  
  23.           Fortran:
  24.                CCCCAAAALLLLLLLL DDDDRRRROOOOTTTTGGGG ((((_a,,,, _b,,,, _c,,,, _s))))
  25.  
  26.           C/C++:
  27.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  28.                vvvvooooiiiidddd ddddrrrroooottttgggg ((((ddddoooouuuubbbblllleeee *_a,,,, ddddoooouuuubbbblllleeee *_b,,,, ddddoooouuuubbbblllleeee *_c,,,, ddddoooouuuubbbblllleeee *_s))));;;;
  29.  
  30.      Single precision complex
  31.  
  32.           Fortran:
  33.                CCCCAAAALLLLLLLL CCCCRRRROOOOTTTTGGGG ((((_a,,,, _b,,,, _c,,,, _s))))
  34.  
  35.           C/C++:
  36.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  37.                vvvvooooiiiidddd ccccrrrroooottttgggg ((((ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_a,,,, ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_b,,,, ffffllllooooaaaatttt *_c,,,,
  38.                ssssccccssssllll____ccccoooommmmpppplllleeeexxxx *_s))));;;;
  39.  
  40.           C++ STL:
  41.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  42.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  43.                vvvvooooiiiidddd ccccrrrroooottttgggg ((((ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_a,,,, ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_b,,,, ffffllllooooaaaatttt *_c,,,,
  44.                ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>> *_s))));;;;
  45.  
  46.      Double precision complex
  47.  
  48.           Fortran:
  49.                CCCCAAAALLLLLLLL ZZZZRRRROOOOTTTTGGGG ((((_a,,,, _b,,,, _c,,,, _s))))
  50.  
  51.           C/C++:
  52.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  53.                vvvvooooiiiidddd zzzzrrrroooottttgggg ((((ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_a,,,, ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_b,,,, ddddoooouuuubbbblllleeee *_c,,,,
  54.                ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx *_s))));;;;
  55.  
  56.           C++ STL:
  57.                ####iiiinnnncccclllluuuuddddeeee <<<<ccccoooommmmpppplllleeeexxxx....hhhh>>>>
  58.                ####iiiinnnncccclllluuuuddddeeee <<<<ssssccccssssllll____bbbbllllaaaassss....hhhh>>>>
  59.                vvvvooooiiiidddd zzzzrrrroooottttgggg ((((ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_a,,,, ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_b,,,, ddddoooouuuubbbblllleeee *_c,,,,
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSRRRROOOOTTTTGGGG((((3333SSSS))))                                                            SSSSRRRROOOOTTTTGGGG((((3333SSSS))))
  71.  
  72.  
  73.  
  74.                ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>> *_s))));;;;
  75.  
  76. IIIIMMMMPPPPLLLLEEEEMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
  77.      These routines are part of the SCSL Scientific Library and can be loaded
  78.      using either the ----llllssssccccssss or the ----llllssssccccssss____mmmmpppp option.  The ----llllssssccccssss____mmmmpppp option
  79.      directs the linker to use the multi-processor version of the library.
  80.  
  81.      When linking to SCSL with ----llllssssccccssss or ----llllssssccccssss____mmmmpppp, the default integer size is
  82.      4 bytes (32 bits). Another version of SCSL is available in which integers
  83.      are 8 bytes (64 bits).  This version allows the user access to larger
  84.      memory sizes and helps when porting legacy Cray codes.  It can be loaded
  85.      by using the ----llllssssccccssss____iiii8888 option or the ----llllssssccccssss____iiii8888____mmmmpppp option. A program may use
  86.      only one of the two versions; 4-byte integer and 8-byte integer library
  87.      calls cannot be mixed.
  88.  
  89.      The C and C++ prototypes shown above are appropriate for the 4-byte
  90.      integer version of SCSL. When using the 8-byte integer version, the
  91.      variables of type iiiinnnntttt become lllloooonnnngggg lllloooonnnngggg and the <<<<ssssccccssssllll____bbbbllllaaaassss____iiii8888....hhhh>>>> header
  92.      file should be included.
  93.  
  94. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  95.      DDDDRRRROOOOTTTTGGGG/SSSSRRRROOOOTTTTGGGG computes the elements of a rotation matrix such that:
  96.  
  97.           _      _     _   _    _   _
  98.           | c  s |     | a |    | r |
  99.           |-s  c | *   | b | =  | 0 |
  100.           -      -     -   -    -   -
  101.  
  102.  
  103.      where
  104.  
  105.                    2    2       2    2
  106.      r = +- sqrt (a  + b ) and c  + s  = 1
  107.  
  108.  
  109.      CCCCRRRROOOOTTTTGGGG/ZZZZRRRROOOOTTTTGGGG computes the elements of a rotation matrix such that:
  110.  
  111.  
  112.           _      _    _   _    _   _
  113.           | c  s |    | a |    | r |
  114.           | _    |    |   |    |   |
  115.           |-s  c | *  | b | =  | 0 |
  116.           -      -    -   -    -   -
  117.  
  118.  
  119.      where
  120.  
  121.                         _             _      _
  122.           r = (a / sqrt(aa)) * sqrt ((aa) + (bb))
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SSSSRRRROOOOTTTTGGGG((((3333SSSS))))                                                            SSSSRRRROOOOTTTTGGGG((((3333SSSS))))
  137.  
  138.  
  139.  
  140.      and the notation
  141.  
  142.           -
  143.           z
  144.  
  145.  
  146.      represents the complex conjugate of _z.
  147.  
  148.      See the NOTES section of this man page for information about the
  149.      interpretation of the data types described in the following arguments.
  150.  
  151.      These routines have the following arguments:
  152.  
  153.      _a      First vector component.  (input and output)
  154.  
  155.             SSSSRRRROOOOTTTTGGGG (Single precision), DDDDRRRROOOOTTTTGGGG (Double precision):
  156.             On input, the first component of the vector to be rotated.  On
  157.             output, _a is overwritten by by _r, the first component of the
  158.             vector in the rotated coordinate system where:
  159.  
  160.                                 2    2
  161.                  r = sign(sqrt(a  + b ,a), if |a| > |b|
  162.  
  163.  
  164.  
  165.                            2    2
  166.             r = sign(sqrt(a  + b ,b), if |a| <= |b|
  167.  
  168.  
  169.             CCCCRRRROOOOTTTTGGGG (Single precision complex), ZZZZRRRROOOOTTTTGGGG (Double precision
  170.             complex):
  171.             On output, _a is overwritten by the unique complex number _r, whose
  172.             size in the complex plane is the Euclidean norm of the complex
  173.             vector ((((aaaa,,,,bbbb)))), and whose direction in the complex plane is the same
  174.             as that of the original complex element _a.
  175.  
  176.             For C/C++, a pointer to this value is passed.
  177.  
  178.      _b      Second vector component. (input and output)
  179.             SSSSRRRROOOOTTTTGGGG: Single precision.
  180.             DDDDRRRROOOOTTTTGGGG: Double precision.
  181.             CCCCRRRROOOOTTTTGGGG: Single precision complex.
  182.             ZZZZRRRROOOOTTTTGGGG: Double precision complex.
  183.             On input, the second component of the vector to be rotated.  On
  184.             output, _b contains _z, where:
  185.  
  186.                  z=s     if |a| > |b|
  187.                  z=1c    if |a| <= |b| and c =/ 0
  188.                  z=1     if c = 0.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SSSSRRRROOOOTTTTGGGG((((3333SSSS))))                                                            SSSSRRRROOOOTTTTGGGG((((3333SSSS))))
  203.  
  204.  
  205.  
  206.             For C/C++, a pointer to this value is passed.
  207.  
  208.      _c      Cosine of the angle of rotation. (output)
  209.             SSSSRRRROOOOTTTTGGGG: Single precision.
  210.             DDDDRRRROOOOTTTTGGGG: Double precision.
  211.             CCCCRRRROOOOTTTTGGGG: Single precision.
  212.             ZZZZRRRROOOOTTTTGGGG: Double precision.
  213.  
  214.             For C/C++, a pointer to this value is passed.
  215.  
  216.      _s      Sine of the angle of rotation. (output)
  217.             SSSSRRRROOOOTTTTGGGG: Single precision.
  218.             DDDDRRRROOOOTTTTGGGG: Double precision.
  219.             CCCCRRRROOOOTTTTGGGG: Single precision complex.
  220.             ZZZZRRRROOOOTTTTGGGG: Double precision complex.
  221.  
  222.             For C/C++, a pointer to this value is passed.
  223.  
  224. NNNNOOOOTTTTEEEESSSS
  225.      SSSSRRRROOOOTTTTGGGG/DDDDRRRROOOOTTTTGGGG routines are Level 1 Basic Linear Algebra Subprograms (Level
  226.      1 BLAS).
  227.  
  228.      CCCCRRRROOOOTTTTGGGG and ZZZZRRRROOOOTTTTGGGG, are extensions to the Level 1 Basic Linear Algebra
  229.      Subprograms (Level 1 BLAS).
  230.  
  231.      The value of _z, returned in _b by SSSSRRRROOOOTTTTGGGG, gives a compact representation of
  232.      the rotation matrix, which can be used later to reconstruct _c and _s as in
  233.      the following example:
  234.  
  235.           IF (B .EQ. 1. ) THEN
  236.              C = 0.
  237.              S = 1.
  238.           ELSEIF( ABS( B) .LT. 1) THEN
  239.              C = SQRT( 1. - B * B)
  240.              S = B
  241.           ELSE
  242.              C = 1. / B
  243.              S = SQRT( 1 - C * C)
  244.           ENDIF
  245.  
  246.  
  247.  
  248.    DDDDaaaattttaaaa TTTTyyyyppppeeeessss
  249.      The following data types are described in this documentation:
  250.  
  251.           TTTTeeeerrrrmmmm UUUUsssseeeedddd                     DDDDaaaattttaaaa ttttyyyyppppeeee
  252.  
  253.      Fortran:
  254.  
  255.           Array dimensioned _n           xxxx((((nnnn))))
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SSSSRRRROOOOTTTTGGGG((((3333SSSS))))                                                            SSSSRRRROOOOTTTTGGGG((((3333SSSS))))
  269.  
  270.  
  271.  
  272.           Integer                       IIIINNNNTTTTEEEEGGGGEEEERRRR (IIIINNNNTTTTEEEEGGGGEEEERRRR****8888 for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  273.  
  274.           Single precision              RRRREEEEAAAALLLL
  275.  
  276.           Double precision              DDDDOOOOUUUUBBBBLLLLEEEE PPPPRRRREEEECCCCIIIISSSSIIIIOOOONNNN
  277.  
  278.           Single precision complex      CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  279.  
  280.           Double precision complex      DDDDOOOOUUUUBBBBLLLLEEEE CCCCOOOOMMMMPPPPLLLLEEEEXXXX
  281.  
  282.      C/C++:
  283.  
  284.           Array dimensioned _n           xxxx[[[[_n]]]]
  285.  
  286.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  287.  
  288.           Single precision              ffffllllooooaaaatttt
  289.  
  290.           Double precision              ddddoooouuuubbbblllleeee
  291.  
  292.           Single precision complex      ssssccccssssllll____ccccoooommmmpppplllleeeexxxx
  293.  
  294.           Double precision complex      ssssccccssssllll____zzzzoooommmmpppplllleeeexxxx
  295.  
  296.      C++ STL:
  297.  
  298.           Array dimensioned _n           xxxx[[[[_n]]]]
  299.  
  300.           Integer                       iiiinnnntttt (lllloooonnnngggg lllloooonnnngggg for ----llllssssccccssss____iiii8888[[[[____mmmmpppp]]]])
  301.  
  302.           Single precision              ffffllllooooaaaatttt
  303.  
  304.           Double precision              ddddoooouuuubbbblllleeee
  305.  
  306.           Single precision complex      ccccoooommmmpppplllleeeexxxx<<<<ffffllllooooaaaatttt>>>>
  307.  
  308.           Double precision complex      ccccoooommmmpppplllleeeexxxx<<<<ddddoooouuuubbbblllleeee>>>>
  309.  
  310. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  311.      IIIINNNNTTTTRRRROOOO____SSSSCCCCSSSSLLLL(3S), IIIINNNNTTTTRRRROOOO____BBBBLLLLAAAASSSS1111(3S), SSSSRRRROOOOTTTT(3S), SSSSRRRROOOOTTTTMMMM(3S), SSSSRRRROOOOTTTTMMMMGGGG(3S)
  312.  
  313.      IIIINNNNTTTTRRRROOOO____CCCCBBBBLLLLAAAASSSS(3S) for information about using the C interface to Fortran 77
  314.      Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic
  315.      Linear Algebra Subprograms Technical Forum.
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                                                         PPPPaaaaggggeeee 5555
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.